﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/MasterAdmin.master" AutoEventWireup="true"
    CodeFile="Feedbacks.aspx.cs" Inherits="Admin_ListFeedbacks" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <h1>
                List Feedbacks</h1>
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="fId" DataSourceID="SqlDataSource1"
                OnItemCommand="ListView1_ItemCommand">
                <AlternatingItemTemplate>
                    <tr style="background-color: #FFFFFF; color: #284775;">
                        <td>
                            <asp:Label ID="fIdLabel" runat="server" Text='<%# Eval("fId") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fFullNameLabel" runat="server" Text='<%# Eval("fFullName") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fEmailLabel" runat="server" Text='<%# Eval("fEmail") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fTitleLabel" runat="server" Text='<%# Eval("fTitle") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fMessageLabel" runat="server" Text='<%# Eval("fMessage") %>' />
                        </td>
                        <td>
                            <asp:CheckBox ID="fActiveCheckBox" runat="server" Checked='<%# Eval("fActive") %>'
                                Enabled="false" />
                        </td>
                        <td>
                            <asp:Button ID="Button1" runat="server" CommandName="Select" Text="View"></asp:Button>
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <EmptyDataTemplate>
                    <table id="Table1" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                        border-color: #999999; border-style: none; border-width: 1px;">
                        <tr>
                            <td>
                                No data was returned.
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <tr style="background-color: #E0FFFF; color: #333333;">
                        <td>
                            <asp:Label ID="fIdLabel" runat="server" Text='<%# Eval("fId") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fFullNameLabel" runat="server" Text='<%# Eval("fFullName") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fEmailLabel" runat="server" Text='<%# Eval("fEmail") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fTitleLabel" runat="server" Text='<%# Eval("fTitle") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fMessageLabel" runat="server" Text='<%# Eval("fMessage") %>' />
                        </td>
                        <td>
                            <asp:CheckBox ID="fActiveCheckBox" runat="server" Checked='<%# Eval("fActive") %>'
                                Enabled="false" />
                        </td>
                        <td>
                            <asp:Button ID="Button1" runat="server" CommandName="Select" Text="View"></asp:Button>
                        </td>
                    </tr>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="Table2" runat="server">
                        <tr id="Tr1" runat="server">
                            <td id="Td1" runat="server">
                                <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;
                                    border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
                                    font-family: Verdana, Arial, Helvetica, sans-serif;">
                                    <tr id="Tr2" runat="server" style="background-color: #E0FFFF; color: #333333;">
                                        <th id="Th1" runat="server">
                                            Id
                                        </th>
                                        <th id="Th2" runat="server">
                                            FullName
                                        </th>
                                        <th id="Th3" runat="server">
                                            Email
                                        </th>
                                        <th id="Th4" runat="server">
                                            Title
                                        </th>
                                        <th id="Th5" runat="server">
                                            Message
                                        </th>
                                        <th id="Th6" runat="server">
                                            Viewed
                                        </th>
                                        <th id="Th7" runat="server">
                                        </th>
                                    </tr>
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="Tr3" runat="server">
                            <td id="Td2" runat="server" style="text-align: center; background-color: #5D7B9D;
                                font-family: Verdana, Arial, Helvetica, sans-serif; color: #FFFFFF">
                                <asp:DataPager ID="DataPager1" runat="server">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <tr style="background-color: #E2DED6; font-weight: bold; color: #333333;">
                        <td>
                            <asp:Label ID="fIdLabel" runat="server" Text='<%# Eval("fId") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fFullNameLabel" runat="server" Text='<%# Eval("fFullName") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fEmailLabel" runat="server" Text='<%# Eval("fEmail") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fTitleLabel" runat="server" Text='<%# Eval("fTitle") %>' />
                        </td>
                        <td>
                            <asp:Label ID="fMessageLabel" runat="server" Text='<%# Eval("fMessage") %>' />
                        </td>
                        <td>
                            <asp:CheckBox ID="fActiveCheckBox" runat="server" Checked='<%# Eval("fActive") %>'
                                Enabled="false" />
                        </td>
                        <td>
                            <asp:Button ID="Button1" runat="server" CommandName="Select" Text="View"></asp:Button>
                        </td>
                    </tr>
                </SelectedItemTemplate>
            </asp:ListView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ShopConnectionString %>"
                SelectCommand="SELECT * FROM [Feedbacks]"></asp:SqlDataSource>
            <br />
            <br />
            <asp:Panel ID="pnl" runat="server">
                <h3>
                    Detail Feedback</h3>
                <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" CellPadding="4"
                    ForeColor="#333333" GridLines="None">
                    <AlternatingRowStyle BackColor="White" />
                    <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EFF3FB" />
                </asp:DetailsView>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
